<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
		<!--[if lte IE 6]></base><![endif]-->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords"
			content="学生综合信息管理平台,学生,综合,信息,管理,管理平台,学生综合,综合信息,学生平台,广东科学技术职业学院,科干,管理平台,学生信息管理,信息管理平台,学生信息网站,学生信息管理网站,科学技术,广科,广科院,广科院学生信息管理,广科院学生综合信息" />
		<title>学生综合信息管理平台</title>
		<link href="images/logo-copy.ico" rel="shortcut icon" type="image/x-icon" />
		<link href="css/login.css" rel="stylesheet" type="text/css" />
		<script language="javascript" type="text/javascript" src="javascript/jquery-1.6.4.js"></script>
		<script language="javascript" type="text/javascript" src="javascript/common.js"></script>	
		
		<script type='text/javascript' src='dwr/interface/loginAction.js'>
</script>
		<script type='text/javascript' src='dwr/engine.js'>
</script>
		<script type='text/javascript' src='javascript/jquery.cookie.js'>
</script>

		<script type='text/javascript' src='dwr/util.js'>
</script>

		<script language="javascript" type="text/javascript">

function validateLogin() {
	var userName = $("#login_name").val();
	var password = $("#login_password").val();
	var type="teacher";
	
	$("#loagingDiv").show()
	loginAction.validateLogin(type,userName, password, function(data) {
		$("#loagingDiv").hide();
		alert(data);
	})
}


$(function(){
	if($.cookie("login_password")){
	$("#login_password").val($.cookie("login_password"));
    }
    $("#login_but").click(function(){
		if($("#checkbox").attr("checked")){	
			$.cookie("login_password",$("#login_password").val(),{
					path:"/", expires:7
	})
}
	else{
	$.cookie("login_password",null,{
	path:"/"
})
}
	return false;
})
})


</script>
	</head>
	<body>
		<div id="headDiv">
			<div id="logoDiv"></div>
			<div id="collectDiv">
				<ul>
					<li>
						<a href="#">加入收藏</a>&nbsp;&nbsp;|
					</li>
					<li>
						<a href="#">联系我们</a>
					</li>
				</ul>
			</div>
			<div id="head_titleDiv">
				学生综合信息管理平台
			</div>
		</div>
		<div id="bodyDiv">
			<div id="bodyLDiv">
				<ul>
					<li>
						<img src="images/student-link.png" />
						学&nbsp;&nbsp;生
					</li>
					<li>
						<img src="images/teacher-link.png" />
						老&nbsp;&nbsp;师
					</li>
					<li>&nbsp; 
					</li>
				</ul>
			</div>
			<div id="bodyRDiv">
				<table class="login_table">
					<tr>
						<td class="login_table_title">
							帐号：
						</td>
						<td>
							<input name="textfield" type="text" id="login_name"
								maxlength="18" />
						</td>
						<td>
							*请输入帐号
						</td>
					</tr>
					<tr>
						<td class="login_table_title">
							密码：
						</td>
						<td>
							<input name="login_password" type="password" id="login_password"
								maxlength="16" />
						</td>
						<td>
							*请输入密码
						</td>
					</tr>
					<tr>
						<td class="login_table_title">
							验证码：
						</td>
						<td>
							<input name="textfield3" type="text" id="login_captcha"
								maxlength="4" />
							<img id="captcha_show" src="images/captcha_show.png" />
						</td>
						<td>
							<a href="#">点击换张</a>
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
						<td>
							<input type="checkbox" name="checkbox" id="checkbox" />
							记住密码&nbsp;&nbsp;&nbsp;&nbsp;忘记密码
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td colspan="3">
							<div class="loagingDiv" style="display: none">
								<img src="images/loading.gif" />
								<br />
								登录中...
							</div>
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
						<td colspan="2" class="but">
							<input type="button" name="button" id="login_but" value="登录"
								onclick="validateLogin()" />
						</td>

					</tr>
				</table>
			</div>
		</div>
		<jsp:include page="common/footer.jsp"></jsp:include>
	</body>
</html>

